package com.gitee.chili.leisure.domain;

import com.gitee.chili.leisure.base.GenerateId;
import com.gitee.chili.leisure.enums.RoomType;
import com.gitee.chili.leisure.enums.Settlement;
import com.gitee.chili.leisure.enums.Status;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.util.Date;

/**
 * LeisureRoom
 *
 * @author week solider
 * @since 2020.09.02
 */
@Data
@Entity
@Accessors(chain = true)
@Table(name = "leisure_room")
@EqualsAndHashCode(callSuper = true)
public class Room extends GenerateId<Long> {

    @Column(name = "user_id")
    private Long userId;

    @Column(name = "games_mode_id")
    private Long gameType;

    @Column(name = "grade_id")
    private Long gradeId;

    @Column(name = "room_number")
    private Long roomNum;

    private Status status;

    /**
     * 0.已解散
     * 1.进行中
     * 2.已结算
     * 3.未结算
     */
    @Column(name = "settlement_status")
    private Settlement settlementStatus;

    @Column(name = "people_num")
    private Integer peopleNum;

    @Column(name = "room_type")
    private RoomType roomType;

    @Column(name = "settlement_time")
    private Date settlementTime;

    private Integer innings;

    public Room() {
    }
}
